<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>变更的函数</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration55.deprecated.html">PHP 5.5.x 中废弃的特性</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration55.new-functions.html">新的函数</a></div>
 <div class="up"><a href="migration55.html">从 PHP 5.4.x 迁移到 PHP 5.5.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration55.changed-functions" class="sect1">
  <h2 class="title">变更的函数</h2>

  <div class="sect2" id="migration55.changed-functions.core">
   <h3 class="title">PHP 核心</h3>

   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      使用 <strong><code>NULL</code></strong> 作为参数调用 <span class="function"><a href="function.set-error-handler.html" class="function">set_error_handler()</a></span> 将重置错误处理程序。
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      当使用 <strong><code>NULL</code></strong> 调用<span class="function"><a href="function.set-error-handler.html" class="function">set_error_handler()</a></span> 和 <span class="function"><a href="function.set-exception-handler.html" class="function">set_exception_handler()</a></span> 时， 现在分别返回上一个错误或异常处理程序。
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.pack.html" class="function">pack()</a></span> 和 <span class="function"><a href="function.unpack.html" class="function">unpack()</a></span> 使用 “a”和“A”格式代码时的行为有所变化。
      <a href="migration55.incompatible.html#migration55.incompatible.pack" class="link">Detailed notes on these changes are available.</a>
     </span>
    </li>
   </ul>
  </div>

  <div class="sect2" id="migration55.changed-functions.intl">
   <h3 class="title"><a href="book.intl.html" class="link">intl</a></h3>

   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <span class="methodname"><a href="messageformatter.format.html" class="methodname">MessageFormatter::format()</a></span> 及其相关函数现在 related functions
      now accept named arguments and mixed numeric and named arguments when PHP
      is linked to ICU 4.8 or later.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="methodname"><a href="messageformatter.format.html" class="methodname">MessageFormatter::format()</a></span> and related functions
      no longer error when an insufficient number of arguments have been
      provided. Instead, the placeholders will not be substituted.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="methodname"><a href="messageformatter.format.html" class="methodname">MessageFormatter::format()</a></span> and
      <span class="methodname"><a href="messageformatter.parse.html" class="methodname">MessageFormatter::parse()</a></span> are no longer limited to
      second precision when dealing with times.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="methodname"><a href="intldateformatter.create.html" class="methodname">IntlDateFormatter::__construct()</a></span> and
      <span class="function"><a href="intldateformatter.create.html" class="function">datefmt_create()</a></span> now accept
      <a href="class.intltimezone.html" class="classname">IntlTimeZone</a> and
      <a href="class.datetimezone.html" class="classname">DateTimeZone</a> objects for the
      <em><code class="parameter">timezone</code></em> argument, and
      <a href="class.intlcalendar.html" class="classname">IntlCalendar</a> objects for the
      <em><code class="parameter">calendar</code></em> argument. Furthermore, if the time zone
      is omitted and the <em><code class="parameter">calendar</code></em> doesn&#039;t specify a time
      zone, PHP&#039;s default time zone from
      <span class="function"><a href="function.date-default-timezone-get.html" class="function">date_default_timezone_get()</a></span> is now used instead of the
      default ICU time zone.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="methodname"><a href="intldateformatter.getcalendar.html" class="methodname">IntlDateFormatter::getCalendar()</a></span> and
      <span class="function"><a href="intldateformatter.getcalendar.html" class="function">datefmt_get_calendar()</a></span> return false if the
      <a href="class.intldateformatter.html" class="classname">IntlDateFormatter</a> object was created with an
      <a href="class.intlcalendar.html" class="classname">IntlCalendar</a> instance instead of one of the
      <a href="class.intldateformatter.html" class="classname">IntlDateFormatter</a> constants.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      除 <a href="class.intldateformatter.html" class="classname">IntlDateFormatter</a> 常量之外，<span class="methodname"><a href="intldateformatter.setcalendar.html" class="methodname">IntlDateFormatter::setCalendar()</a></span> 和 <span class="function"><a href="intldateformatter.setcalendar.html" class="function">datefmt_set_calendar()</a></span>现在接受 <a href="class.intlcalendar.html" class="classname">IntlCalendar</a> 对象。
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="methodname"><a href="intldateformatter.format.html" class="methodname">IntlDateFormatter::format()</a></span> 和 <span class="function"><a href="intldateformatter.format.html" class="function">datefmt_format()</a></span> 现在接受 <a href="class.intlcalendar.html" class="classname">IntlCalendar</a> 对象。
     </span>
    </li>
   </ul>
  </div>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration55.deprecated.html">PHP 5.5.x 中废弃的特性</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration55.new-functions.html">新的函数</a></div>
 <div class="up"><a href="migration55.html">从 PHP 5.4.x 迁移到 PHP 5.5.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
